<?php
require_once('../lib/simple_html_dom.php');
require_once('../common/conn.php');
$dh =file_get_html('../html/dh.html');
$a_tags = $dh->find('a');
$get_time = date('Y-m-d h:m:i',time());
foreach($a_tags as $a_tag){
	$url = $a_tag->href;
	$site_name = $a_tag->plaintext;
	$sql = "INSERT INTO `search`.`domain` (`id`, `url`, `site_name`, `get_time`) VALUES (null, '{$url}', '{$site_name}','{$get_time}');";
	mysql_query($sql);
	echo mysql_error();
}